<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./js/vue.js"></script>
</head>
<body>

    <div id="app">
        <!--1.使用局部组件-->
        <haha></haha>
        <xixi></xixi>
    </div>

    <script>
        //1.定义局部组件
        var part_component = {
            template:"<h1>子曰:吾日三省吾身</h1>"
        }

        //2.创建vue对象
        var vue = new Vue({
            el:"#app",
            components:{
                //注册局部组件
                haha:part_component,
                xixi:{
                    template:"<h1>子曰:有朋自远方来</h1>"
                }
            }
        })

    </script>

</body>
</html>